import React, { Component } from 'react';
import Animate from 'react-smooth';

class Spring extends Component {
  constructor(props) {
    super(props);
    this.state = {};
  }
  render() { 
    return (
      <div>
        <h2>弹簧动画</h2>
        <Animate from={{left: 0}} to={{left: 100}} easing="spring">
          <div style={{width: 100, height: 100, background: 'red', position: 'relative'}}>text</div>
        </Animate>
      </div>
    );
  }
}
 
export default Spring;